//created by: Lim Yi Le
Ext.define('MajorProjectSenchaTouch.model.RecommendTitle',{
     extend: 'Ext.data.Model',
     config:{
         fields: [
             {
                 name: 'name',
                 type: 'string'
             },
             {
                 name: 'email',
                 type: 'string'
             },
             {
                 name: 'departmentorschool',
                 type: 'string'
             },
             {
                 name: 'recommendedtitle',
                 type: 'string'
             },
             {
                 name: 'otherinfoontitle',
                 type: 'string'
             },
             {
                 name: 'titletype',
                 type: 'string'
             }
         ],
         validations: [
            {
                field: 'name',
                type: 'presence',
                message: 'Name is required.'
            },
            {
                field: 'email',
                type: 'presence',
                message: 'Email is required.'
            },
            {
                field: 'email',
                type: 'email',
                message: 'Email must be in the format me@emailprovider.com.'
            },
            {
                field: 'departmentorschool',
                type: 'presence',
                message: 'Department/School is required.'
            },
            {
                field: 'recommendedtitle',
                type: 'presence',
                message: 'Recommended Title is required.'
            },
            {
                field: 'titletype',
                type: 'presence',
                message: 'Title Type (Book/AV) is required.'
            }
         ]
     }
 });

